1. Field of the Invention
The present invention relates to a computer system having a power saving function and an apparatus and method for controlling the power saving function. In particular, the present invention relates to an apparatus and method for suspending the power saving process so as to restart a previously running computer operation without waiting for completion of the power saving function.
2. Description of the Related Art
In recent years, a variety of portable computers, have been developed. These units typically run on a battery and therefore, it is desirable to save power and lengthen the amount of time the computer will run on a single battery charge.
Various types of power-saving modes are used for battery consumption. One is called a suspending mode. When the computer system enters into the suspending mode most of the devices in the system are powered down. The main memory is not powered down because it stores the system data and the user program and is needed to re-start an operation that was suspended. The system data saved in the main memory includes a CPU status and various peripheral unit statuses that existed just before entering the suspending mode. The main memory also stores an operating system and execution status of application programs and any user data produced by the application programs.
The saving of the system data is executed by a suspending routine included in a system Basic Input/Output program (BIOS). The system BIOS controls hardware in the computer system in response to requests from the operating system. The BIOS contains a plurality of device drivers for controlling the respective hardware devices in the computer system. The suspending routine in the BIOS is activated when a power source of the computer system is switched to OFF.
If the battery loses all power during the suspending mode, all data in the main memory is lost and the system can not return to its prior operating state. To prevent this loss, another system is used to supplement the suspending mode. Every device in the computer is not powered down until after saving contents of a main memory into a secondary memory.
As operating systems and application programs improve, the capacity of a main memory in a computer system is steadily increasing. This increase in capacity increases the time required to save the contents of the main memory to a hard disk and the time to perform a power saving process.
In a conventional computer system a power saving process begins in response to, for example, a power source being switched OFF by a user or a lid of the computer being closed. Once the process starts, the system can not be restored to its prior state of operation until the power saving process has completed.
Given the relatively long period of time required for a power saving process, a computer can not be quickly restarted. If a user turned the system power source to OFF by mistake, or if a request for continuing a previous operation is generated during the power saving process, the computer system must wait to restart until the lengthy power saver process is completed. Therefore it is desirable to suspend the power saver operation and enable regular computer processes to continue.